import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login'
import Info from '../views/Info.vue'
import User from '../views/User.vue'
import Singer from '../views/Singer.vue'
import Song from '../views/Song.vue'

import Home from '../components/Home.vue'
import Aside from '../components/Aside.vue'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Login
  },
  {
    path: '/aside',
    component: Aside
  },
  {
    path: '/home',
    component: Home,
    children:[
      {
        path: '/info',
        component: Info
      },
      {
        path: '/user',
        component: User
      },
      {
        path: '/singer',
        component: Singer
      },
      {
        path: '/song',
        component: Song
      }
    ]
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
